package com.fance.dao;

import com.fance.model.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author fance
 * @date 18-5-3 下午4:44
 */
@Mapper
public interface NewsDAO {

    int addNews(News news);

    List<News> selectByUserIdAndOffset(@Param("userId") int userId, @Param("offset") int offset,
                                       @Param("limit") int limit);


    News getById(int newsId);

    int updateCommentCount(@Param("id") int id, @Param("commentCount") int commentCount);


    int updateLikeCount(@Param("id") int id, @Param("likeCount") int likeCount);
}
